1. Field of the Invention
The present invention relates to a method for detecting inclination of an image of characters that is being read, especially to a method for detecting inclination so as to correct non intended inclination of a paper that is to be input and read as an image by a device such as a copy machine, facsimile machine, or optical character recognition system.
2. Description of the Related Art
When a paper that is to be input inclines relative to the input device, the character lines printed on the paper also incline. When such a paper is input in an inclined condition to a facsimile machine or to an optical character recognition system, the data compression ratio and recognition ratio are lowered. For copy machines, it is necessary to correct the inclination of a paper to be copied automatically in order to stabilize the quality of the copy.
The conventional method for recognizing inclination uses the techniques of expansion, shrinking and thinning (Nakamura, et al., "Algorithm to Extracting Character Area for Mixed-Mode Communication", The Transactions of the Institute of Electronics, Information and Communication Engineers, Vol. J67-D, No. 11, pp. 1277-284, November, 1984). According to this method, after binarizing the characters on the paper that is to be input and read, the neighboring characters are connected by expansion. Next, the row of connected characters are formed into rather thin lines by shrinking the image, filling the holes and thinning the image. Any uneven parts on the ends of the thinned image are made smooth by shrinking. In such a thinned image, the inclination of the group with a predetermined length is calculated after the items have been labeled. This inclination is regarded as the inclination of the paper to be input.
When using this known method, the number of times which expansion must be performed is determined by experience. In order to obtain the optimal number of expansions, characteristics of the paper to be input such as the size, quality, and material must be considered by eye.